package com.whfc.mach.dao;

import com.whfc.mach.entity.AppMaintainItem;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AppMaintainItemMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AppMaintainItem record);

    int insertSelective(AppMaintainItem record);

    AppMaintainItem selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AppMaintainItem record);

    int updateByPrimaryKey(AppMaintainItem record);

    /**
     * 根据保养id查找
     *
     * @param maintainId
     * @return
     */
    List<String> selectByMaintainId(@Param("maintainId") Integer maintainId);

    /**
     * 批量插入
     *
     * @param maintainId
     * @param itemList
     */
    void batchInsert(@Param("maintainId") Integer maintainId,
                     @Param("itemList") List<String> itemList);
}